package com.jinken.service.impl;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.jinken.service.IGoodsService;
import org.springframework.stereotype.Service;

@Service
public class GoodsServiceImpl implements IGoodsService {
    /**
     * 给当前资源创建在Sentinel控制台能配置资源
     */
    @SentinelResource("queryGoods")
    public void queryGoods() {
        System.out.println("查询商品");
    }

    /**
     * 给当前资源设置一个Sentinel资源
     */
    @SentinelResource("hot")
    public void findById(String id) {
        System.out.println("id = " + id);
    }
}
